bench: yard_export emits predicate-owned subquery plans - #2
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b63d0f9ab2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (predicate.kind == sql::PredicateKind::Comparison) { | ||
| collect_scalar_subquery(predicate.comparison.left, subqueries); | ||
| collect_scalar_subquery(predicate.comparison.right, subqueries); | ||
| } |
There was a problem hiding this comment.
Traverse scalar operands for every predicate kind
When a scalar subquery is used as the operand of IS NULL/IS NOT NULL, or as the left operand of IN/NOT IN, this comparison-only branch never visits predicate.null_check or predicate.in_value. As a result, yard_export omits those owned plans from the JSON tree (and for IN, emits only the membership subquery), even though the logical-plan printer includes both. Handle predicate kinds explicitly and collect scalar subqueries from each applicable operand.
Useful? React with 👍 / 👎.
The JSON tree emitter walked only structural children, so a plan whose predicates own subquery plans (the materialised
INform) exported a tree missing the subquery branch. The emitter now walks comparison operands,IN/EXISTSpredicate subplans, and null-aware predicates, emitting each as anop: "Subquery"child with its own estimate and children.docs/yard/yard-routes.jsonand the "Yard Routes" section ofdocs/benchmarks.mdare re-exported from the same Release configuration. No library, test, or CI change.